[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
    Procedure Barometer(X,Y:Word;MaxLen:Byte;WithMe:Char;
                        Current,EndPoint:LongInt)

    This is  a  rather  useful  procedure  which  draws  a  barometer  or
    temperature  gauge  style  bar.      This  is  ideal  for  processing
    information.  Instead of using the  xx% method, rather use this which
    will draw a bar at (X,Y) using ASCII character WithMe.

    MaxLen specifies the size of the barometer on screen.

    Current specifies how far the process  is complete (0 is the starting
    point) and EndPoint specifies the highest value Current will reach.

    Example

    Barometer(1,1,10,'.',0,100)

    will display nothing because the process is 0/100 complete.

    Barometer(1,1,10,'.',50,100)

    will display

    .....

    because the process is  50/100  (half)  complete  and the bar size is
    10 when the process is 100/100 complete.

    Barometer(1,1,4,'.',70,70)

    will display

    ....

    because the process is complete  (70/70)  and  the maximum bar length
    is 4 characters.

    Notes

    Usually the character '#' is used.

    The procedure is  very  fast.   It  assumes  that  the  bar is always
    growing, that  is,  the  process  is  never  40%  complete  and  then
    later say  30%  complete.   Current  must  always  be  unchanged from
    the previous procedure call  or  larger  than  the previous procedure
    call.

    Example

    Barometer(1,1,4,'.',50,70)
    Barometer(1,1,4,'.',40,70)

    is not permitted.

    The procedure only adds the changes to the screen for speed.

    Notice in  the  source  code,  the  variable  Previous  is  a  static
    variable in the data segment.

This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson